package com.zczc.web.controller;

import com.zczc.service.MessageGetterService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 11:58 2019-1-14
 * @Modify by:
 */
public abstract class BaseController {

  /**
   * 去除前端非法参数
   * @param t
   * @param <T>
   * @return
   */
  protected <T>T convert(T t){
    return t==null || "".equals(t) || "undefined".equals(t) ?null:t;
  }

  /**
   * 处理用户消息获取相关业务
   */
  @Autowired
  protected MessageGetterService messageGetterService;

}
